package com.jiancong.mapper;

import com.jiancong.domain.entity.Article;
import com.jiancong.domain.vo.ArticleAndTas;
import com.jiancong.domain.vo.ArticleListVo;
import com.jiancong.domain.vo.ArticleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ArticleMapper{

    List<Article> hotArticleList();

    List<ArticleListVo> articleList(Long categoryId);

    Article getById(Long id);

    List<Article> selectList();

    void updateBatchById(@Param("articles")List<Article> articles);

    void save(Article article);

    List<ArticleVo> getArticles(@Param("articlevo") ArticleVo articlevo);
    List<ArticleVo> getArticlesById(@Param("articlevo")ArticleVo articlevo,@Param("userId")Long userId);

    ArticleAndTas selectArticleDetailById(@Param("id") Long id);

    void updateArticle(@Param("article") Article article);

    void deleteArticleTaps(@Param("id") Long id);

    void deleteArticleById(@Param("id") Long id, @Param("updateBy") Long updateBy, @Param("updateTime") Date updateTime);
}
